package com.ghline.caloncabe.model;

import com.ghline.caloncabe.GameView;

import android.graphics.Bitmap;
import android.graphics.Canvas;

public class ScoreBar {
	
    private int x = 0;
    private int y = 0;
    private GameView gameView;
    private Bitmap bmp;
    private int width;
    private int height;
	
	public ScoreBar(GameView gameView, Bitmap bmp) {
		
		this.gameView = gameView;
        this.bmp = bmp;
	}
	
	private void update() {
		x = 0;
		y = 0;
	}

	public void draw(Canvas canvas) {	
		
		update();
		int num = (int) (Math.floor((gameView.getWidth() / bmp.getWidth())) + 1);
		for (int i = 0; i < num; i++) {
			canvas.drawBitmap(bmp, x + (i*bmp.getWidth()), y, null);
		}        
	}

	public int getWidth() {
		return width;
	}
	public int getHeight() {
		return height;
	}
	public int getX() {
		return x;
	}
	public int getY() {
		return y;
	}
	public Bitmap getBmp() {
		return bmp;
	}
	public void setBmp(Bitmap bmp) {
		this.bmp = bmp;
	}
}
